1. Field of the Invention
The present invention generally relates to an image forming apparatus, a control method therefor, and a computer-readable storage medium containing computer-executable instructions for implementing various functions based on print data (page description language (PDL) data) of a print job received from a host.
2. Description of the Related Art
A conventional image forming and output apparatus, which forms an image of print data (PDL data) of a print job received from a host and outputs the formed image, stores the print data (PDL data) of the received print job. Thus, the conventional image forming and output apparatus implements various functions.
Japanese Patent Application Laid-Open No. 07-096638 discusses such an apparatus capable of performing interruption printing by interrupting a currently executed print job.
Further, Japanese Patent No. 02803087 discusses an apparatus capable of performing collate printing for bringing together print products with respect to each job.
Furthermore, Japanese Patent Application Laid-Open No. 08-039898 discusses an apparatus capable of performing reservation printing for reserving a print job (i.e., not starting printing of the print job), until a user enters a correct password.
Meanwhile, a specific type of PDL exists that supports an interactive print mode. The “interactive print mode” refers to a print mode for interactively performing print processing between a host and a printer.
For example, PostScript® of Adobe® Systems Incorporated supports an interactive data communication in which a printer sends to a host a result of executing PostScript data (e.g., a command) that has been transmitted from the host.
FIG. 2 illustrates the above-described case, where the printer sends a response (“true” (=installed)) to an inquiry (e.g., command) about whether Times-Roman font is installed, which inquiry has been transmitted from the host.
However, the following may arise in a case where the above-described conventional image forming apparatus simultaneously executes a function implemented by received print data that it stores (such as an interruption printing function, a collate printing function, or a reservation printing function), and a print mode for interactively performing printing with the host.
FIG. 3 illustrates print data (PDL data).
Referring to FIG. 3, PDL data 301 is constituted by commands 1 through 4. When the command 1 is executed, response data 1, which is a response to the host, is generated. Similarly, when the command 3 is executed, response data 2 is generated.
In addition, page 1 is generated when the commands 1 and 2 are executed. In the same way, when the commands 3 and 4 are executed, page 2 is generated.
The printer (FIG. 2) stores the PDL data 301 received from the host, so that the interruption printing, the collate printing, and the reservation printing are implemented.
FIG. 4 illustrates an example of processing when the printer receives an interrupting job while processing the PDL data 301.
In the example illustrated in FIG. 4, the processing performed by a PDL interpreter in the printer is suspended when the interrupting job is input. Accordingly, in this case, response data to a command, which is not executed, is not sent to the host. Therefore, the host may continue waiting for response data from the printer.
Further, in resuming the interrupted job (e.g., returning from the interrupting job) after the processing for the interrupting job has been completed, the PDL interpreter interprets the PDL data 301 stored in the printer all over again from its top portion.
This is because the PDL interpreter cannot resume interpreting the PDL data 301, whose interpretation has been suspended, from the suspended portion, since a content of the PDL data (e.g., PostScript) 301 may have been recursively described.
When the PDL interpreter interprets the PDL data 301 again from its top portion, the response data 1 is generated upon executing the command 1. Then, the PDL interpreter sends the generated response data 1 to the host again.
However, at this time, the host has been waiting for the response data 2 corresponding to the command 3 that is different from the response data 1 sent from the PDL interpreter, so that inconsistency can arise.
On the other hand, a number of pages so far printed can also be easily stored when the interrupting job is input and the job is suspended. Consequently, an image of the already printed pages can be excluded from printing when returning from the interrupting job.
However, the number of printed pages and a state of the executed command before executing the interrupting job do not always correspond to each other because the content of the PDL data 301 has been recursively described, as discussed above. Accordingly, it may be difficult not to send the response data to the host.
This may arise in each of the cases where an interrupting job is input while an interactive print job is processed and where the PDL interpreter returns from processing of the interrupting job.
FIG. 5 illustrates an example of processing performed by the printer for printing two or more sets of copies of the PDL data 301 by collate printing.
In FIG. 5, the PDL interpreter interprets the PDL data 301 stored in the printer again from its top portion in printing the second and subsequent sets of copies. Therefore, the PDL interpreter sends the response data 1 and 2 when the PDL interpreter performs the interpretation for a plurality of times.
However, since the host has sent the PDL data 301 only once, an inconsistency occurs between the PDL data 301 and the response data 1 and 2 sent for the plurality of times. As described above, this may arise in the case of printing two or more sets of copies of the interactive print job by collate printing.
Meanwhile, in a case of reservation printing, the PDL interpreter does not start interpreting the PDL data stored in the printer unless a user issues a print start instruction. Accordingly, in this case, the PDL interpreter does not send any response data to the host until the user issues the print start instruction even in the case of the interactive print job. Therefore, the host may continue waiting for the response data from the printer.